package com.ymatou.iapi.deviceid.service;

import org.json.JSONObject;

import com.ymatou.iapi.coupon.parameter.old.CheckCouponsData;
import com.ymatou.iapi.deviceid.parameter.devicelist;
import com.ymt.base.YmatouBaseCall;
import com.ymt.core.tool.FormatUtil;
import com.ymttest.utils.DataUtil;
import com.ymttest.utils.EnvSetup;
/**
*获取一组DeviceId信息Call
*FreeMaker Template自动生成代码
*/
public class getListCall extends YmatouBaseCall{
	private static String opurl ="getList";
	
	public getListCall() {
		super(EnvSetup.getSystemUrl("deviceid"),opurl,"GET","PARAM");
	}
	@Override
	public void addDefHeader() {
		client.addHeader("Accept","text/xml,text/javascript,text/html,application/json");
		client.addHeader("Content-Type", "application/json; charset=UTF-8");
	}
	

	public String getCode()
	{
	    return getString("code");
	}
	
	public String getBCode()
	{
	    return getString("bcode");
	}
	
	public String getMSG()
	{
	    return getString("msg");
	}
	
	public String getData()
	{
	    return getString("data");
	}
	
	public devicelist getReturnList()
    {
		devicelist data = null;
        try {
            data = (devicelist) FormatUtil.GSONToObject(getReturnData(), devicelist.class);

        } catch (Exception e) {
            e.printStackTrace();
        }
        return data;
    }
	
}